﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class ParseDate
{
    public static string Parse(string dateFormat)
    {
        try
        {
            string[] formats = { "dd.MM.yyyy", "dd/MM/yyyy", "dd.MM.yy", "dd/MM/yy" };
            IFormatProvider formatProvider = null;
            DateTime date = DateTime.ParseExact(dateFormat, formats, formatProvider, System.Globalization.DateTimeStyles.None);
            return String.Format("day={0:00}, month={1:00}, year={2:0000}",date.Day,date.Month,date.Year);
        }
        catch (Exception)
        {
            
            throw new InvalidCastException("Illigal date format!");
        }
    }

    static void Main()
    {
        Console.WriteLine(Parse("15/06/10"));
    }
}
